home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Cafe 3
/
Visual Cafe 3.ISO
/
Vcafe
/
Main.bin
/
VPOJAVA.DLL
/
SOURCE
/
APPLETFRAME
< prev
next >
Wrap
Text File
|
1998-12-10
|
2KB
|
65 lines
/*
An extension of the java.awt.Frame class that can show an Applet
*/
import java.awt.*;
import java.applet.*;
public class AppletFrame extends symantec.itools.awt.AppletFrame
{
public AppletFrame()
{
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{{INIT_CONTROLS
//}}
//{{INIT_MENUS
//}}
//{{REGISTER_LISTENERS
//}}
show();
}
public static void main(String args[])
{
new AppletFrame().show();
}
public void addNotify()
{
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSize();
super.addNotify();
if (fComponentsAdjusted)
return;
// Adjust components according to the insets
setSize(insets().left + insets().right + d.width, insets().top + insets().bottom + d.height);
Component components[] = getComponents();
for (int i = 0; i < components.length; i++)
{
Point p = components[i].getLocation();
p.translate(insets().left, insets().top);
components[i].setLocation(p);
}
fComponentsAdjusted = true;
}
// Used for addNotify check.
boolean fComponentsAdjusted = false;
//{{DECLARE_CONTROLS
//}}
//{{DECLARE_MENUS
//}}
}